{extend name="default/users/base" /}
{block name="title"}买家中心 - {:WSTConf('CONF.mallName')}{__block__}{/block}
{block name="css"}
{/block}
{block name="main"}{/block}
{block name='content'}
<div>
                      <div class="u-base-info">
                          <div class="info-lcol">
                            <div class="u-pic">
                              <img class='usersImg' data-original="{:WSTUserPhoto(session('tb_USER.userPhoto'))}"/>
                                  <a href="#"><div class="mask"></div></a>
                            </div>
                            <div class="info-m">
                              <div class="u-name">
                                <a href="#" target="_blank">{:session('tb_USER.userName')?session('tb_USER.userName'):session('tb_USER.loginName')}</a>
                              </div>
                               {php}$signScore=explode(",",WSTConf('CONF.signScore'));{/php}
                              {if(WSTConf('CONF.signScoreSwitch')==1 && $signScore[0]>0)}
                              <div class="wst-us-sign">
                                {if(session('tb_USER.signScoreTime')==date('Y-m-d'))}
								<button id="j-sign" class="sign active">已签到</button>
								{else}
								<button id="j-sign" class="sign" onclick="javascript:WST.inSign();">签到领积分</button>
								{/if}
                              </div>
                              {/if}
                              <div class="u-level">
                                {if (int)session('tb_USER.rankId') > 0 }
                                <span class="rank r2"> 
                                  <a href="javascript:void(0)" target="_blank">
                                    <s><img class="rankimg" src="__RESOURCE_PATH__/{:session('tb_USER.userrankImg')}"/></s>
                                  </a>
                                <a href="javascript:void(0)" target="_blank">{:session('tb_USER.rankName')}</a>&nbsp;
                                </span>
                                {/if}
                                
                              </div>
                              <div class="u-safe">
                                  <a id="accountSafe" href="{:url('home/users/security')}"><span>账户安全：</span></a>
                                  {if($level==1)}
                                  <i id="cla" class="safe-rank01"></i>
                                  <strong id="rank-text" class="rank-text ftx-01">低级</strong>
                                  {elseif($level==2)}
                                  <i id="cla" class="safe-rank02"></i>
                                  <strong id="rank-text" class="rank-text ftx-02">中级</strong>
                                  {else/}
                                  <i id="cla" class="safe-rank02"></i>
                                  <strong id="rank-text" class="rank-text ftx-03">高级</strong>
                                  {/if}
                                </div>
                                <div class="info-line">
                                  <span class="top-icon"></span>
                                  <span class="bottom-icon"></span>
                                  <span class="left-icon"></span>
                                </div>
                            </div>
                          </div>
                          <div class="info-rcol">
                                <div class="user-counts">
                                    <ul>
                                        <li>
                                            <div class="count-item">
                                                <a href="{:url('home/orders/waitPay')}" target="_self">
                                                    <i class="count-icon count-icon01"></i> 待付款
                                                    <em id="waitPay">{$waitPay}</em>
                                                </a>
                                            </div>
                                        </li>
                                        <li>
                                            <div class="count-item">
                                                <a href="{:url('home/orders/waitReceive')}" target="_self">
                                                    <i class="count-icon count-icon02"></i> 待收货
                                                    <em id="waitReceive">{$waitReceive}</em>
                                                </a>
                                            </div>
                                        </li>
                                        <li>
                                            <div class="count-item">
                                                <a href="{:url('home/orders/finish')}" target="_self">
                                                  <i class="count-icon count-icon03"></i> 已收货
                                                    <em id="waitPick">{$received}</em>
                                                </a>
                                            </div>
                                        </li>
                                        <li>
                                            <div class="count-item">
                                                <a href="{:url('home/orders/waitAppraise')}">
                                                    <i class="count-icon count-icon04"></i> 待评价
                                                    <em id="waitAppr">{$waitAppr}</em>
                                                </a>
                                            </div>
                                        </li>
                                    </ul>
                                </div>
                                <div class="acco-info">
                                    <ul>
                                        <li>
                                            <div class="acco-item">
                                                <div>
                                                    <label>我的余额：</label>
                                                    <a href="{:url('home/logmoneys/usermoneys?homeMenuId=43')}" id="BalanceCount">￥{$data.userMoney}</a>
                                                </div>
                                                <div>
                                                    <label>我的积分：</label>
                                                    <a href="{:url('home/userscores/index?homeMenuId=43')}" id="BalanceCount">{$data.userScore}</a>
                                                </div>
                                                <div>
                                                    <label>未读消息：</label>
                                                    <a href="{:url('home/messages/index')}" id="BalanceCount">{$message}</a>
                                                </div>
                                                <div>
                                                    <label>上次登录：</label>
                                                    <a href="javascript:void(0)" id="BalanceCount">{:session('tb_USER.lastTime')}</a>
                                                </div>
                                            </div>
                                        </li>
                                    </ul>
                                </div>
                          </div>
                      </div>     
                </div>
                {/* 我的订单 */}
                <div class="mod-main">
                   <div class="mt">
                      <h3>我的订单</h3>
                   </div>
                </div>
                <div class="mc">
                      <div id="tb-order" class="tb-order">
                          <table width="100%" cellspacing="0" cellpadding="0" border="0">
                            {wst:order type="user" num="5" }
                            {php}$hasOrder=true{/php}
                            <tbody>                           
                              <tr>
                                <td>
                                  <div class="img-list">
                                    {volist name="$vo['goods']" id="og"}
                                    <a href="{:url('home/goods/detail',['goodsId'=>$og['goodsId']])}" target="_blank">
                                      <img data-original='__RESOURCE_PATH__/{$og['goodsImg']}'  class="goodsImg" />
                                    </a>
                                    {/volist}
                                  </div>                                
                                </td>                                
                                <td>
                                  <div class="u-name">{$vo.userName}</div>
                                </td>                                
                                <td>￥{$vo.realTotalMoney}<br>{$vo.payType==1?'在线支付':'货到付款'}</td>                                
                                <td>
                                  <span class="ftx-03">
                                    {$vo.createTime}
                                  </span>
                              </td>                                
                                <td class="td-01">
                                  <strong class="ftx-04 order-statu">
                                    {:WSTLangOrderStatus($vo.orderStatus)}
                                  </strong>
                                </td>
                                <td class="order-doi">
                                  <a target="_blank" href="{:url('home/orders/detail',['id'=>$vo.orderId])}">查看</a>
                                </td>                            
                              </tr>                        
                            </tbody>
                            {/wst:order}
                          </table>
                          {/* 无订单 */}
                          {if(!isset($hasOrder))}
                          <div class="nocont-box nocont-order">
                            <b class="icon-order"></b>
                            您买的东西太少了，这里都空空的，快去挑选合适的商品吧！
                          </div>
                          {/if}

                      </div>
                  </div>
              </div>
{/block}
{block name="js"}{/block}